# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-pvr-hts
pkgver=19.0.6
_realname=Matrix
pkgrel=0
pkgdesc="Kodi's Tvheadend HTSP client addon"
options="!check" # no test suite
url="https://github.com/kodi-pvr/pvr.hts"
arch="x86 x86_64 aarch64 armv7" # kodi
license="GPL-2.0-only"
makedepends="bsd-compat-headers cmake kodi-dev"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/kodi-pvr/pvr.hts/archive/$pkgver-$_realname.tar.gz"
builddir="$srcdir/pvr.hts-$pkgver-$_realname"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi \
		-DUSE_LTO=1
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="
81fd5e18aaacd428aad8e36766a3c5ed71dd22f50b6cffd9238bfd0bce5811a2d30c43c9097e15b53d308b61eb4af87d9e04051b996df941cab41523957754fe  kodi-pvr-hts-19.0.6-Matrix.tar.gz
"
